package com.sailorj.itools.entity;

public class ParserColumn implements Comparable<ParserColumn> {

    private Integer index;

    private String columnName;

    private String sqlColumnName;

    private String columnTypes;

    private String columnType;

    private String jdbcType;

    private String columnComment;

    private String isNull;

    private String defaultValue;

    @Override
    public String toString() {
        return "ParserColumn{" +
                "index=" + index +
                ", columnName='" + columnName + '\'' +
                ", sqlColumnName='" + sqlColumnName + '\'' +
                ", columnTypes='" + columnTypes + '\'' +
                ", columnType='" + columnType + '\'' +
                ", jdbcType='" + jdbcType + '\'' +
                ", columnComment='" + columnComment + '\'' +
                ", isNull='" + isNull + '\'' +
                ", defaultValue='" + defaultValue + '\'' +
                '}';
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String getIsNull() {
        return isNull;
    }

    public void setIsNull(String isNull) {
        this.isNull = isNull;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getSqlColumnName() {
        return sqlColumnName;
    }

    public void setSqlColumnName(String sqlColumnName) {
        this.sqlColumnName = sqlColumnName;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public String getJdbcType() {
        return jdbcType;
    }

    public void setJdbcType(String jdbcType) {
        this.jdbcType = jdbcType;
    }

    public String getColumnComment() {
        return columnComment;
    }

    public void setColumnComment(String columnComment) {
        this.columnComment = columnComment;
    }

    public String getColumnTypes() {
        return columnTypes;
    }

    public void setColumnTypes(String columnTypes) {
        this.columnTypes = columnTypes;
    }

    @Override
    public int compareTo(ParserColumn other) {
        // 进行升序排序
        return Integer.compare(this.index, other.index);
    }
}
